package com.pd.state;

/**
 * Created with IntelliJ IDEA.
 * User: 5
 * Date: 17-2-27
 * Time: 下午2:35
 * To change this template use File | Settings | File Templates.
 */
public class Morning implements State {
    @Override
    public void writeProgram(Work work) {
        if (work.getTime()<12){
            System.out.println("现在是早上，非常好");
        }else {
           work.setState(new Noon());
           work.dowork();
        }
    }
}
